<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/painting/qbrush.cpp -->
<head>
  <title>Qt 4.3: QRadialGradient Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QRadialGradient Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QRadialGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a radial gradient brush. <a href="#details">More...</a></p>
<pre> #include &lt;QRadialGradient&gt;</pre><p>Inherits <a href="qgradient.html">QGradient</a>.</p>
<ul>
<li><a href="qradialgradient-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qradialgradient.html#QRadialGradient">QRadialGradient</a></b> ()</li>
<li><div class="fn"/><b><a href="qradialgradient.html#QRadialGradient-2">QRadialGradient</a></b> ( const QPointF &amp; <i>center</i>, qreal <i>radius</i>, const QPointF &amp; <i>focalPoint</i> )</li>
<li><div class="fn"/><b><a href="qradialgradient.html#QRadialGradient-3">QRadialGradient</a></b> ( qreal <i>cx</i>, qreal <i>cy</i>, qreal <i>radius</i>, qreal <i>fx</i>, qreal <i>fy</i> )</li>
<li><div class="fn"/><b><a href="qradialgradient.html#QRadialGradient-4">QRadialGradient</a></b> ( const QPointF &amp; <i>center</i>, qreal <i>radius</i> )</li>
<li><div class="fn"/><b><a href="qradialgradient.html#QRadialGradient-5">QRadialGradient</a></b> ( qreal <i>cx</i>, qreal <i>cy</i>, qreal <i>radius</i> )</li>
<li><div class="fn"/>QPointF <b><a href="qradialgradient.html#center">center</a></b> () const</li>
<li><div class="fn"/>QPointF <b><a href="qradialgradient.html#focalPoint">focalPoint</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qradialgradient.html#radius">radius</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qradialgradient.html#setCenter">setCenter</a></b> ( const QPointF &amp; <i>center</i> )</li>
<li><div class="fn"/>void <b><a href="qradialgradient.html#setCenter-2">setCenter</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qradialgradient.html#setFocalPoint">setFocalPoint</a></b> ( const QPointF &amp; <i>focalPoint</i> )</li>
<li><div class="fn"/>void <b><a href="qradialgradient.html#setFocalPoint-2">setFocalPoint</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</li>
<li><div class="fn"/>void <b><a href="qradialgradient.html#setRadius">setRadius</a></b> ( qreal <i>radius</i> )</li>
</ul>
<ul>
<li><div class="fn"/>8 public functions inherited from <a href="qgradient.html#public-functions">QGradient</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QRadialGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify a radial gradient brush.</p>
<p>Radial gradients interpolate colors between a focal point and end points on a circle surrounding it. Outside the end points the gradient is either padded, reflected or repeated depending on the currently set <a href="qgradient.html#Spread-enum">spread</a> method:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/qradialgradient-pad.png" /></td><td><img src="images/qradialgradient-reflect.png" /></td><td><img src="images/qradialgradient-repeat.png" /></td></tr>
<tr valign="top" class="even"><td><a href="qgradient.html#Spread-enum">PadSpread</a> (default)</td><td><a href="qgradient.html#Spread-enum">ReflectSpread</a></td><td><a href="qgradient.html#Spread-enum">RepeatSpread</a></td></tr>
</table></p>
<p>The colors in a gradient is defined using stop points of the <a href="qgradient.html#QGradientStop-typedef">QGradientStop</a> type, i.e&#x2e; a position and a color. Use the <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() or the <a href="qgradient.html#setStops">QGradient::setStops</a>() function to define the stop points. It is the gradient's complete set of stop points that describes how the gradient area should be filled. If no stop points have been specified, a gradient of black at 0 to white at 1 is used.</p>
<p>In addition to the functions inherited from <a href="qgradient.html">QGradient</a>, the QRadialGradient class provides the <a href="qradialgradient.html#center">center</a>(), <a href="qradialgradient.html#focalPoint">focalPoint</a>() and <a href="qradialgradient.html#radius">radius</a>() functions returning the gradient's center, focal point and radius respectively.</p>
<p>See also <a href="qlineargradient.html">QLinearGradient</a>, <a href="qconicalgradient.html">QConicalGradient</a>, and <a href="demos-gradients.html">The Gradients Demo</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QRadialGradient"></a>QRadialGradient::QRadialGradient ()</h3>
<p>Constructs a radial gradient with the center and focal point at (0, 0) with a radius of 1.</p>
<h3 class="fn"><a name="QRadialGradient-2"></a>QRadialGradient::QRadialGradient ( const <a href="qpointf.html">QPointF</a> &amp; <i>center</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>radius</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>focalPoint</i> )</h3>
<p>Constructs a radial gradient with the given <i>center</i>, <i>radius</i> and <i>focalPoint</i>.</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<h3 class="fn"><a name="QRadialGradient-3"></a>QRadialGradient::QRadialGradient ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>cx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>cy</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>radius</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>fx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>fy</i> )</h3>
<p>Constructs a radial gradient with the given center (<i>cx</i>, <i>cy</i>), <i>radius</i> and focal point (<i>fx</i>, <i>fy</i>).</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<h3 class="fn"><a name="QRadialGradient-4"></a>QRadialGradient::QRadialGradient ( const <a href="qpointf.html">QPointF</a> &amp; <i>center</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>radius</i> )</h3>
<p>Constructs a radial gradient with the given <i>center</i>, <i>radius</i> and the focal point in the circle center.</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<h3 class="fn"><a name="QRadialGradient-5"></a>QRadialGradient::QRadialGradient ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>cx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>cy</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>radius</i> )</h3>
<p>Constructs a radial gradient with the center at (<i>cx</i>, <i>cy</i>) and the specified <i>radius</i>. The focal point lies at the center of the circle.</p>
<p>See also <a href="qgradient.html#setColorAt">QGradient::setColorAt</a>() and <a href="qgradient.html#setStops">QGradient::setStops</a>().</p>
<h3 class="fn"><a name="center"></a><a href="qpointf.html">QPointF</a> QRadialGradient::center () const</h3>
<p>Returns the center of this radial gradient in logical coordinates.</p>
<p>See also <a href="qradialgradient.html#setCenter">setCenter</a>() and <a href="qgradient.html#stops">QGradient::stops</a>().</p>
<h3 class="fn"><a name="focalPoint"></a><a href="qpointf.html">QPointF</a> QRadialGradient::focalPoint () const</h3>
<p>Returns the focal point of this radial gradient in logical coordinates.</p>
<p>See also <a href="qradialgradient.html#setFocalPoint">setFocalPoint</a>() and <a href="qgradient.html#stops">QGradient::stops</a>().</p>
<h3 class="fn"><a name="radius"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QRadialGradient::radius () const</h3>
<p>Returns the radius of this radial gradient in logical coordinates.</p>
<p>See also <a href="qradialgradient.html#setRadius">setRadius</a>() and <a href="qgradient.html#stops">QGradient::stops</a>().</p>
<h3 class="fn"><a name="setCenter"></a>void QRadialGradient::setCenter ( const <a href="qpointf.html">QPointF</a> &amp; <i>center</i> )</h3>
<p>Sets the center of this radial gradient in logical coordinates to <i>center</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qradialgradient.html#center">center</a>().</p>
<h3 class="fn"><a name="setCenter-2"></a>void QRadialGradient::setCenter ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the center of this radial gradient in logical coordinates to (<i>x</i>, <i>y</i>).</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qradialgradient.html#center">center</a>().</p>
<h3 class="fn"><a name="setFocalPoint"></a>void QRadialGradient::setFocalPoint ( const <a href="qpointf.html">QPointF</a> &amp; <i>focalPoint</i> )</h3>
<p>Sets the focal point of this radial gradient in logical coordinates to <i>focalPoint</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qradialgradient.html#focalPoint">focalPoint</a>().</p>
<h3 class="fn"><a name="setFocalPoint-2"></a>void QRadialGradient::setFocalPoint ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the focal point of this radial gradient in logical coordinates to (<i>x</i>, <i>y</i>).</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qradialgradient.html#focalPoint">focalPoint</a>().</p>
<h3 class="fn"><a name="setRadius"></a>void QRadialGradient::setRadius ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>radius</i> )</h3>
<p>Sets the radius of this radial gradient in logical coordinates to <i>radius</i></p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qradialgradient.html#radius">radius</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
